package edu.neu.ecommerceplatform.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class CreateAddressRequest {

    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @NotBlank(message = "收件人姓名不能为空")
    @Size(max = 50, message = "收件人姓名长度不能超过50字符")
    private String receiverName;

    @NotBlank(message = "收件人电话不能为空")
    @Size(max = 20, message = "收件人电话长度不能超过20字符")
    private String receiverPhone;

    @NotBlank(message = "国家不能为空")
    @Size(max = 40, message = "国家长度不能超过40字符")
    private String country;

    @NotBlank(message = "省份不能为空")
    @Size(max = 40, message = "省份长度不能超过40字符")
    private String province;

    @NotBlank(message = "地区/县不能为空")
    @Size(max = 40, message = "地区/县长度不能超过40字符")
    private String county;

    @NotBlank(message = "详细地址不能为空")
    @Size(max = 60, message = "详细地址长度不能超过60字符")
    private String detailAddress;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverPhone() {
        return receiverPhone;
    }

    public void setReceiverPhone(String receiverPhone) {
        this.receiverPhone = receiverPhone;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    @Override
    public String toString() {
        return "CreateAddressRequest{" +
                "userId=" + userId +
                ", receiverName='" + receiverName + '\'' +
                ", receiverPhone='" + receiverPhone + '\'' +
                ", country='" + country + '\'' +
                ", province='" + province + '\'' +
                ", county='" + county + '\'' +
                ", detailAddress='" + detailAddress + '\'' +
                '}';
    }
} 